import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from '/@/App.vue';
import router from '/@/router';
import { directive } from '/@/directive/index';
import { i18n } from '/@/i18n/index';
import other from '/@/utils/other';
import ElementPlus from 'element-plus';
import '/@/theme/index.scss';
import VueGridLayout from 'vue-grid-layout';
import VForm3 from 'public/vform/designer.umd.js'
import '../public/vform/designer.style.css'
//全局数据字典下拉框组件
import DicSelect from '/@/components/dicSelect/index.vue';
import directives from "/@/directives/index";
import GridLayout from "vue3-drr-grid-layout";
import "vue3-drr-grid-layout/dist/style.css";
//定义一个全局的后端接口地址，表单设计器使用
window.API_SERVER = import.meta.env.VITE_API_URL_ORIGIN_ENABLED === 'true' ? window.location.origin : import.meta.env.VITE_API_URL
const app = createApp(App);

directive(app);
other.elSvg(app);

app.use(pinia).use(router).use(ElementPlus)
    .use(i18n)
    .use(VueGridLayout)
    .use(VForm3)
    .use(directives)
    .use(GridLayout).mount('#app');
//全局数据字典下拉框
app.component('DicSelect', DicSelect)